package com.woniuxy.portal.controller;

import com.woniuxy.portal.model.entity.BookType;
import com.woniuxy.portal.service.BookTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author yellow Docter
 * @date 2024-10-15
 * @desc 蜗牛创想：www.woniuxy.com
 */
@RestController
@RequestMapping("/bookType")
@Api(tags = "书籍分类")
public class BookTypeController {

    @Autowired
    private BookTypeService bookTypeService;

    @ApiOperation("书籍分类查询")
    @GetMapping("/findAll")
    public ResponseEntity<List<BookType>> findAll(){

        List<BookType> list = bookTypeService.findAll();

        return ResponseEntity.ok(list);
    }

}
